package rlex.classes.program;


/*
 * program ID;
 * PROCEDURES
 * VARIABLES
 * CODE
 */
public class Program {
	private String name;
	private VariableDeclarationList vars;
	private ProcedureList procedures;
	private Command command;	
	
	public String toString() {
		String ret = "Program " + name + " ";
		if (vars != null) {
			ret += "[" + vars.toString() + "]";
		}
		if (procedures != null) {
			ret += "{" + procedures.toString() + "}";
		}
		ret += command.toString();
		return ret;
	}
	
	public void display() {
		System.out.println("Program name : " + name);
		vars.display(0);
		procedures.display(0);
		command.display(0);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public VariableDeclarationList getVars() {
		return vars;
	}

	public void setVars(VariableDeclarationList vars) {
		this.vars = vars;
	}

	public ProcedureList getProcedures() {
		return procedures;
	}

	public void setProcedures(ProcedureList procedures) {
		this.procedures = procedures;
	}

	public Command getCommand() {
		return command;
	}

	public void setCommand(Command command) {
		this.command = command;
	}
	
	
	
}
